package com.fan.util;

import java.awt.*;

/**
 * 游戏常量在该类中维护
 */
public class Constant {
    /****************************游戏窗口相关********************************/
    public static  final String GAME_TITLE = "坦克大战";


    public static final int FRAME_WIDTH = 900;
    public static final int FRAME_HEIGHT = 700;

    //动态获得当前系统的屏幕宽高
    public static final int SCREEN_W = Toolkit.getDefaultToolkit().getScreenSize().width;
    public static final int SCREEN_H = Toolkit.getDefaultToolkit().getScreenSize().height;

    public static final int FRAME_X = SCREEN_W-FRAME_WIDTH>>1;
    public static final int FRAME_Y = SCREEN_H-FRAME_HEIGHT>>1;


    /***********************游戏菜单相关***********************************/
    public static final int STATE_MENU = 0;
    public static final int STATE_HELP = 1;
    public static final int STATE_ABOUT = 2;
    public static final int STATE_RUN = 3;
    public static final int STATE_OVER = 4;


    public static final String[] MENUS = {
      "开始游戏",
      "继续游戏",
      "游戏帮助",
      "游戏关于",
      "退出游戏"
    };

    public static final String OVER_STR0 = "ESC退出游戏";
    public static final String OVER_STR1 = "ENTER回主菜单";

    //字体设置
    public static final Font font = new Font("宋体",Font.BOLD,24);
    public static final Font SMALL_font = new Font("宋体",Font.BOLD,15);

    public static final int REPAINT_INTERVAL = 30;

    //最多10个敌人坦克
    public static final int ENEMY_MAX_COUNT = 10;

    //坦克出现的间隔
    public static final int ENEMY_BORN_INTERVAL = 5000;

    //状态的刷新时间
    public static final int ENEMY_AI_INTERVAL = 3000;

    //开火的百分率
    public static final double ENEMY_FIRE_PERCENT = 0.05;
}
